var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("BaseModuleUI"),
    a = e("NotifyEventType"),
    i = e("AssetsManager"),
    r = cc._decorator,
    s = r.ccclass,
    l =
        (r.property,
        (function (e) {
            function t() {
                return (null !== e && e.apply(this, arguments)) || this;
            }
            return (
                __extends(t, e),
                (t.prototype.addEvent = function () {
                    this.attachEvent(a.default.SEND_TOWER_LIGHTING_TARGET_INFO, this.createLightNode, this);
                }),
                (t.prototype.createLightNode = function (e, t) {
                    if (cc.isValid(t, !0) && t.active) {
                        var o = t.getPosition(),
                            n = cc.instantiate(i.default.getInstance().getFightPrefab("lighting_node"));
                        n.setPosition(o),
                            n.getComponent(sp.Skeleton).setAnimation(0, "blue_lighting", !1),
                            n.getComponent(sp.Skeleton).setCompleteListener(function () {
                                n.destroy();
                            }),
                            this.node.addChild(n);
                    }
                }),
                __decorate([s], t)
            );
        })(n.default));
o.default = l;
